﻿using System;
using System.Globalization;
using System.Windows.Data;
using YKXiangQi.Common;

namespace YKXiangQi.Converters
{
    public class SecondToMinuteConverter: IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (long) value/60;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value.ToLong() *60;
        }
    }
}
